<template>
  <div class="interract-content">
    <el-header height="150px">
      <el-row>
        <el-col :lg="2" :md="2" :sm="24" :xl="2" :xs="24"><div style="color: transparent">占位符</div></el-col>
        <el-col :lg="20" :md="20" :sm="24" :xl="20" :xs="24">
          <div class="page-top">
            <el-image class="icon-back" :src="icon_back" @click="goback"></el-image>
            <div class="txt-back" @click="goback">返回</div> <!--$router.back()-->
            <span class="txt-line">|</span>
            <span class="txt">如需开通模块请联系管理员</span>
          </div>
        </el-col>
        <el-col :lg="2" :md="2" :sm="24" :xl="2" :xs="24"><div style="color: transparent">占位符</div></el-col>
      </el-row>
    </el-header>
    <!--轮播-->
    <el-main>
      <el-row>
        <el-col :lg="2" :md="2" :sm="24" :xl="2" :xs="24">
          <div style="color: transparent">占位符</div>
        </el-col>
        <el-col :lg="20" :md="20" :sm="24" :xl="20" :xs="24">

          <div class="box-ul">
            <div class="box-li" v-for="(item,index) in superurl" :key="index" >
              <el-image
                class="box-li-img"
                :src="item.url"
                fit="fill" />
              <div class="box-li-right">
                <div class="title">{{item.title}}</div>
                <div class="txt">{{item.txt}}</div>
                <el-image class="ewm" :src="item.ewm" fit="fill" />
                <div class="text"><el-image class="icon-weixin" :src="icon_weixin" fit="fill"/>{{ txt }}</div>
              </div>
            </div>
          </div>

        </el-col>
        <el-col :lg="2" :md="2" :sm="24" :xl="2" :xs="24">
          <div style="color: transparent">占位符</div>
        </el-col>
      </el-row>
    </el-main>
  </div>
</template>
<script>
export default {
  name: "interact",
  data() {
    return {
      icon_back: require('@/assets/login_images/icon-return.png'),
      calleft:0,  //calleft是整个数据的偏移量
      active1:'',
      active2:'',
      windowWidth: document.documentElement.clientWidth,  //实时屏幕宽度
      windowHeight: document.documentElement.clientHeight,   //实时屏幕高度

      txt:'扫码关注',
      superurl: [
        {
          url:require('@/assets/login_images/img1.png'),
          title:'互动模块名称1',
          txt:'功能升级中...',
          ewm:require('@/assets/login_images/ewm.png'),
        },{
          url:require('@/assets/login_images/img2.png'),
          title:'互动模块名称2',
          txt:'功能升级中...',
          ewm:require('@/assets/login_images/ewm.png'),
        },{
          url:require('@/assets/login_images/img3.png'),
          title:'互动模块名称3',
          txt:'功能升级中...',
          ewm:require('@/assets/login_images/ewm.png'),
        },{
          url:require('@/assets/login_images/img1.png'),
          title:'互动模块名称4',
          txt:'功能升级中...',
          ewm:require('@/assets/login_images/ewm.png'),
        }
      ],
      icon_weixin:require('@/assets/login_images/icon-weixin.png'),
    }
  },
  created() {
    //this.move()
  },
  mounted() {
    var that = this;
    // <!--把window.onresize事件挂在到mounted函数上-->
    window.onresize = () => {
      return (() => {
        window.fullHeight = document.documentElement.clientHeight;
        window.fullWidth = document.documentElement.clientWidth;
        that.windowHeight = window.fullHeight;  // 高
        that.windowWidth = window.fullWidth; // 宽
      })()
    };
  },
  watch: {
    windowHeight (val) {
      let that = this;
      console.log("实时屏幕高度：",val, that.windowHeight );
    },
    windowWidth (val) {
      let that = this;
      console.log("实时屏幕宽度：",val, that.windowWidth );
    }
  },
  methods:{
    //返回
    goback(){
      this.$router.go(-1)
    },
    mouseOver1() {
      this.active1 = "background-color:rgba(31,45,61,.11)";
      // 操作dom 获取p标签改变其样式
    },
    // 移出
    mouseLeave1() {
      this.active1 = "";
    },
    mouseOver2() {
      this.active2 = "background-color:rgba(31,45,61,.11)";
      // 操作dom 获取p标签改变其样式
    },
    // 移出
    mouseLeave2() {
      this.active2 = "";
    },
    //移动
    move() {
      this.timer = setInterval(this.starmove, 4000)
    },
    //开始移动
    starmove() {
      // 340是根据自己图片的大小自己设置的，点击一下整体向左平移多少
      this.calleft -= 500;
      if (this.calleft < -1200) {
        this.calleft = 0
      }
    },
    //鼠标悬停时停止移动
    stopmove() {
      clearInterval(this.timer)
    },
    //点击按钮左移
    zuohua() {
      this.calleft -= 500;
      if (this.calleft < -1200) {
        this.calleft = 0
      }
    },
    //点击按钮右移
    youhua() {
      this.calleft += 500;
      if (this.calleft > 0) {
        this.calleft = -1500
      }
    },
  }
}
</script>

<style lang="scss" scoped>
/*超链接图片*/
.box-ul{
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}
.box-li{
  display: flex;
  flex-direction: row;
  width: 430px;
  margin-right: 100px;
  margin-bottom: 100px;
  overflow: hidden;
  .box-li-img{
    width: 200px;
    height: 400px;
    margin-right: 30px;
  }
  .box-li-right{
    width: 200px;
    display: flex;
    flex-direction: column;
    .title{
      font-size: 24px;
      font-weight: bold;
      line-height: 41px;
      color: #333333;
      margin-bottom: 10px;
    }
    .txt{
      font-size: 14px;
      font-weight: 400;
      line-height: 25px;
      height: 75px;
      color: #999999;
      margin-bottom: 50px;
      text-overflow: -o-ellipsis-lastline;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 3;
    }
    .ewm{
      width: 150px;
      height: 150px;
      margin-bottom: 10px;
    }
    .text{
      display: flex;
      align-items: center;
      font-size: 18px;
      font-weight: 400;
      line-height: 31px;
      color: #333333;
      .icon-weixin{
        width: 20px;
        height: 20px;
        margin-right: 10px;
      }
    }
  }
}
.box-li:nth-of-type(3n){
  margin-right: 0;
}

.threeImg .Containt ul {
  margin: 0 auto;
  width: 3000px;
  position: absolute;
  left: 0px;
  height: 100%
}

.threeImg .Containt ul li {
  width: 480px;
  margin-right: 20px;
  float: left;
  list-style-type:none;
}


.interract-content {
  background: url('~@/assets/login_images/bg_hdmk.jpg') center center fixed no-repeat;
  background-size: cover;
}
.page-top{
  display: flex;
  align-items: center;
  margin-top: 50px;
  .icon-back{
    cursor: pointer;
    width: 16px;
    height: 14px;
    margin-right: 10px;
  }
  .txt-back{
    cursor: pointer;
    font-size: 24px;
    font-weight: 400;
    line-height: 41px;
    color: #000000;
  }
  .txt-line{
    color: #ddd;
    font-size: 24px;
    font-weight: 400;
    line-height: 41px;
    margin: 0 15px;
  }
  .txt{
    font-size: 20px;
    font-weight: 400;
    line-height: 34px;
    color: #000;
    opacity: 0.47;
  }
}
</style>
